Create sentry-opentelemetry-otlp module for comining OpenTelemetry SDK OTLP export with Sentry SDK#5100
Conversation
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧Deps
Other
🤖 This preview updates automatically when you update the PR. |
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- Create `sentry-opentelemetry-otlp` module for comining OpenTelemetry SDK OTLP export with Sentry SDK ([#5100](https://github.com/getsentry/sentry-java/pull/5100))If none of the above apply, you can opt out of this check by adding |
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 9ea89e8 | 308.06 ms | 358.16 ms | 50.10 ms |
| d15471f | 310.26 ms | 377.04 ms | 66.78 ms |
| d364ace | 382.77 ms | 443.21 ms | 60.44 ms |
| 806307f | 357.85 ms | 424.64 ms | 66.79 ms |
| 17a0955 | 372.53 ms | 446.70 ms | 74.17 ms |
| 6edfca2 | 316.43 ms | 398.90 ms | 82.46 ms |
| d15471f | 343.13 ms | 361.47 ms | 18.34 ms |
| 319f256 | 317.53 ms | 370.83 ms | 53.29 ms |
| 9fbb112 | 359.71 ms | 421.85 ms | 62.14 ms |
| 539ca63 | 313.51 ms | 355.43 ms | 41.92 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 9ea89e8 | 1.58 MiB | 2.28 MiB | 716.23 KiB |
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
| d364ace | 1.58 MiB | 2.11 MiB | 539.75 KiB |
| 806307f | 1.58 MiB | 2.10 MiB | 533.42 KiB |
| 17a0955 | 1.58 MiB | 2.10 MiB | 533.20 KiB |
| 6edfca2 | 1.58 MiB | 2.13 MiB | 559.07 KiB |
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
| 319f256 | 1.58 MiB | 2.19 MiB | 619.79 KiB |
| 9fbb112 | 1.58 MiB | 2.11 MiB | 539.18 KiB |
| 539ca63 | 1.58 MiB | 2.12 MiB | 551.41 KiB |
| @@ -0,0 +1,122 @@ | |||
| package io.sentry.opentelemetry.otlp; | |||
| @@ -0,0 +1,120 @@ | |||
| package io.sentry.opentelemetry.otlp; | |||
| properties.put("otel.logs.exporter", "none"); | ||
| properties.put("otel.metrics.exporter", "none"); | ||
| // OTLP traces exporter configuration | ||
| properties.put("otel.traces.exporter", "otlp,logging"); |
There was a problem hiding this comment.
👀 Example usage from plain Java + OTel SDK
|
|
||
| # OTEL configuration | ||
| # Use Sentry propagator to propagate sentry-trace and baggage headers | ||
| otel.propagators=tracecontext,baggage,sentry |
There was a problem hiding this comment.
👀 Spring Boot config example
| @@ -0,0 +1 @@ | |||
| io.sentry.samples.spring.boot4.otlp.SentryOtlpPropagatorProvider | |||
There was a problem hiding this comment.
👀 Spring Boot config example
| @@ -0,0 +1,18 @@ | |||
| package io.sentry.samples.spring.boot4.otlp; | |||
There was a problem hiding this comment.
👀 Spring Boot config example
| return trigger; | ||
| } | ||
|
|
||
| @Bean |
There was a problem hiding this comment.
👀 Spring Boot config example
📜 Description
sentry-opentelemetry-otlpmodule containing:OpenTelemetryOtlpPropagatorto use in OpenTelemetry SDK configOpenTelemetryOtlpEventProcessorto use in Sentry SDK config💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps